# Factorization.py
# 求整数的所有因数
# -*- coding: utf-8 -*-
"""
Created on 2021

@author: Ximing
"""

import math

number = int(input("输入要分解的整数: "))
list = []

def getChildren(num):
	isZhishu = True
	i = 2
	square = int(math.sqrt(num)) + 1
	while i <= square:
		if num % i == 0:
			list.append(i)
			isZhishu = False
			getChildren(num / i)
			i += 1
			break
		i += 1
	if isZhishu:
		list.append(num)

getChildren(number)
print('因数分解结果：',list)
